# 分阶段 构建 空当接龙-2
FROM node:20.19.0-alpine3.21 AS freecell_2

WORKDIR /app

COPY 空当接龙-2 /app

RUN npm config set registry https://registry.npmmirror.com  && \
    npm i  && \
    npm run build

# 最终构建
FROM nginx:1.28.0-alpine3.21-slim

COPY nginx.conf /etc/nginx/nginx.conf

RUN mkdir -p /app
COPY 空当接龙-1 /app/空当接龙-1
COPY --from=freecell_2 /app/build /app/空当接龙-2
COPY 蜘蛛纸牌-1 /app/蜘蛛纸牌-1
COPY 蜘蛛纸牌-2 /app/蜘蛛纸牌-2

EXPOSE 5107 5108 5109 5110

# docker build -t firfe/solitaire:2025.06.01 .
